89d7143ef416ccf82c7a621c60e085821ffcbd9e,clients/unshaded/src/test/java/tachyon/client/file/FileOutStreamTest.java,FileOutStreamTest,createTestStream,#number#OutStreamOptions#,343
Before Change
// Cannot use Whitebox to set mFileSystemContext because it needs to be mocked during the
// constructor
FileOutStream stream = new FileOutStream(FILE_ID, options, mFileSystemContext);
Whitebox.setInternalState(stream, "mBlockStoreContext", mBlockStoreContext);
return stream;
}
}
After Change
}
private FileOutStream createTestStream(long fileId, OutStreamOptions options) throws IOException {
Whitebox.setInternalState(BlockStoreContext.class, "INSTANCE", mBlockStoreContext);
Whitebox.setInternalState(FileSystemContext.class, "INSTANCE", mFileSystemContext);
FileOutStream stream = new FileOutStream(FILE_ID, options);
return stream;